/*!
 * \file       ny8be64d.h
 * \brief      NY8BE64D header file
 * \author     HuangTing
 * \date       2021/10/27
 * \details    define register
 */

#ifndef NY8BE64D_H_S5PBG7ND
#define NY8BE64D_H_S5PBG7ND

#ifndef __CPU_HAS_SET
#  ifdef __SDCC
#    warning "Use NY8.h instead of <icbody>.h for consistency."
#  endif
#endif

#include <ny8common.h>

#ifndef   __EEPROM_SUPPORTED
#  define __EEPROM_SUPPORTED 1
#endif
#ifndef   __EEPROM_TIMEOUT
#  define __EEPROM_TIMEOUT 1
#endif
#include <ny8_eeprom.h>

extern __at(0x0000) __sfr INDF;

extern __at(0x0001) __sfr TMR0;

extern __at(0x0002) __sfr PCL;

extern __at(0x0003) __sfr STATUS;

extern __at(0x0004) __sfr FSR;

typedef struct __PORTAbits_t
{
    unsigned PA0      : 1;
    unsigned PA1      : 1;
    unsigned PA2      : 1;
    unsigned PA3      : 1;
    unsigned PA4      : 1;
    unsigned PA5      : 1;
    unsigned PA6      : 1;
    unsigned PA7      : 1;
} __PORTAbits_t;

extern __at(0x0005) volatile __PORTAbits_t PORTAbits;
extern __at(0x0005) __sfr PORTA;
__sbit PA0    = PORTA : 0;
__sbit PA1    = PORTA : 1;
__sbit PA2    = PORTA : 2;
__sbit PA3    = PORTA : 3;
__sbit PA4    = PORTA : 4;
__sbit PA5    = PORTA : 5;
__sbit PA6    = PORTA : 6;
__sbit PA7    = PORTA : 7;

typedef struct __PORTBbits_t
{
    unsigned PB0      : 1;
    unsigned PB1      : 1;
    unsigned PB2      : 1;
    unsigned PB3      : 1;
    unsigned PB4      : 1;
    unsigned PB5      : 1;
    unsigned PB6      : 1;
    unsigned PB7      : 1;
} __PORTBbits_t;

extern __at(0x0006) volatile __PORTBbits_t PORTBbits;
extern __at(0x0006) __sfr PORTB;
__sbit PB0    = PORTB : 0;
__sbit PB1    = PORTB : 1;
__sbit PB2    = PORTB : 2;
__sbit PB3    = PORTB : 3;
__sbit PB4    = PORTB : 4;
__sbit PB5    = PORTB : 5;
__sbit PB6    = PORTB : 6;
__sbit PB7    = PORTB : 7;

typedef struct __PORTCbits_t
{
    unsigned PC0      : 1;
    unsigned PC1      : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
} __PORTCbits_t;

extern __at(0x0007) volatile __PORTCbits_t PORTCbits;
extern __at(0x0007) __sfr PORTC;
__sbit PC0    = PORTC : 0;
__sbit PC1    = PORTC : 1;

typedef struct __PCONbits_t
{
    unsigned EELOCK   : 1;
    unsigned EEW_ERR  : 1;
    unsigned          : 1;
    unsigned LVREN    : 1;
    unsigned PHPA5    : 1;
    unsigned LVDEN    : 1;
    unsigned PLPA4    : 1;
    unsigned WDTEN    : 1;
} __PCONbits_t;

extern __at(0x0008) volatile __PCONbits_t PCONbits;
extern __at(0x0008) __sfr PCON;
__sbit EELOCK = PCON : 0;
__sbit EEW_ERR = PCON : 1;
__sbit LVREN  = PCON : 3;
__sbit PHPA5  = PCON : 4;
__sbit LVDEN  = PCON : 5;
__sbit PLPA4  = PCON : 6;
__sbit WDTEN  = PCON : 7;

typedef struct __BWUCONbits_t
{
    unsigned WUPB0    : 1;
    unsigned WUPB1    : 1;
    unsigned WUPB2    : 1;
    unsigned WUPB3    : 1;
    unsigned WUPB4    : 1;
    unsigned WUPB5    : 1;
    unsigned WUPB6    : 1;
    unsigned WUPB7    : 1;
} __BWUCONbits_t;

extern __at(0x0009) volatile __BWUCONbits_t BWUCONbits;
extern __at(0x0009) __sfr BWUCON;
__sbit WUPB0  = BWUCON : 0;
__sbit WUPB1  = BWUCON : 1;
__sbit WUPB2  = BWUCON : 2;
__sbit WUPB3  = BWUCON : 3;
__sbit WUPB4  = BWUCON : 4;
__sbit WUPB5  = BWUCON : 5;
__sbit WUPB6  = BWUCON : 6;
__sbit WUPB7  = BWUCON : 7;

extern __at(0x000A) __sfr PCHBUF;

typedef struct __ABPLCONbits_t
{
    unsigned PLPA0    : 1;
    unsigned PLPA1    : 1;
    unsigned PLPA2    : 1;
    unsigned PLPA3    : 1;
    unsigned PLPB0    : 1;
    unsigned PLPB1    : 1;
    unsigned PLPB2    : 1;
    unsigned PLPB3    : 1;
} __ABPLCONbits_t;

extern __at(0x000B) volatile __ABPLCONbits_t ABPLCONbits;
extern __at(0x000B) __sfr ABPLCON;
__sbit PLPA0  = ABPLCON : 0;
__sbit PLPA1  = ABPLCON : 1;
__sbit PLPA2  = ABPLCON : 2;
__sbit PLPA3  = ABPLCON : 3;
__sbit PLPB0  = ABPLCON : 4;
__sbit PLPB1  = ABPLCON : 5;
__sbit PLPB2  = ABPLCON : 6;
__sbit PLPB3  = ABPLCON : 7;

typedef struct __BPHCONbits_t
{
    unsigned PHPB0    : 1;
    unsigned PHPB1    : 1;
    unsigned PHPB2    : 1;
    unsigned PHPB3    : 1;
    unsigned PHPB4    : 1;
    unsigned PHPB5    : 1;
    unsigned PHPB6    : 1;
    unsigned PHPB7    : 1;
} __BPHCONbits_t;

extern __at(0x000C) volatile __BPHCONbits_t BPHCONbits;
extern __at(0x000C) __sfr BPHCON;
__sbit PHPB0  = BPHCON : 0;
__sbit PHPB1  = BPHCON : 1;
__sbit PHPB2  = BPHCON : 2;
__sbit PHPB3  = BPHCON : 3;
__sbit PHPB4  = BPHCON : 4;
__sbit PHPB5  = BPHCON : 5;
__sbit PHPB6  = BPHCON : 6;
__sbit PHPB7  = BPHCON : 7;

typedef struct __CPHCONbits_t
{
    unsigned PHPC0    : 1;
    unsigned PHPC1    : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
} __CPHCONbits_t;

extern __at(0x000D) volatile __CPHCONbits_t CPHCONbits;
extern __at(0x000D) __sfr CPHCON;
__sbit PHPC0  = CPHCON : 0;
__sbit PHPC1  = CPHCON : 1;

typedef struct __INTEbits_t
{
    unsigned T0IE     : 1;
    unsigned PABIE    : 1;
    unsigned INT0IE   : 1;
    unsigned T1IE     : 1;
    unsigned LVDIE    : 1;
    unsigned          : 1;
    unsigned WDTIE    : 1;
    unsigned INT1IE   : 1;
} __INTEbits_t;

extern __at(0x000E) volatile __INTEbits_t INTEbits;
extern __at(0x000E) __sfr INTE;
__sbit T0IE   = INTE : 0;
__sbit PABIE  = INTE : 1;
__sbit INT0IE = INTE : 2;
__sbit T1IE   = INTE : 3;
__sbit LVDIE  = INTE : 4;
__sbit WDTIE  = INTE : 6;
__sbit INT1IE = INTE : 7;

typedef struct __INTFbits_t
{
    unsigned T0IF     : 1;
    unsigned PABIF    : 1;
    unsigned INT0IF   : 1;
    unsigned T1IF     : 1;
    unsigned LVDIF    : 1;
    unsigned          : 1;
    unsigned WDTIF    : 1;
    unsigned INT1IF   : 1;
} __INTFbits_t;

extern __at(0x000F) volatile __INTFbits_t INTFbits;
extern __at(0x000F) __sfr INTF;
__sbit T0IF   = INTF : 0;
__sbit PABIF  = INTF : 1;
__sbit INT0IF = INTF : 2;
__sbit T1IF   = INTF : 3;
__sbit LVDIF  = INTF : 4;
__sbit WDTIF  = INTF : 6;
__sbit INT1IF = INTF : 7;

typedef struct __ADMDbits_t
{
    unsigned CHS0     : 1;
    unsigned CHS1     : 1;
    unsigned CHS2     : 1;
    unsigned CHS3     : 1;
    unsigned GCHS     : 1;
    unsigned EOC      : 1;
    unsigned START    : 1;
    unsigned ADEN     : 1;
} __ADMDbits_t;

extern __at(0x0010) volatile __ADMDbits_t ADMDbits;
extern __at(0x0010) __sfr ADMD;
__sbit CHS0   = ADMD : 0;
__sbit CHS1   = ADMD : 1;
__sbit CHS2   = ADMD : 2;
__sbit CHS3   = ADMD : 3;
__sbit GCHS   = ADMD : 4;
__sbit EOC    = ADMD : 5;
__sbit START  = ADMD : 6;
__sbit ADEN   = ADMD : 7;

typedef struct __ADRbits_t
{
    unsigned AD0      : 1;
    unsigned AD1      : 1;
    unsigned AD2      : 1;
    unsigned AD3      : 1;
    unsigned ADCK0    : 1;
    unsigned ADCK1    : 1;
    unsigned ADIE     : 1;
    unsigned ADIF     : 1;
} __ADRbits_t;

extern __at(0x0011) volatile __ADRbits_t ADRbits;
extern __at(0x0011) __sfr ADR;
__sbit AD0    = ADR : 0;
__sbit AD1    = ADR : 1;
__sbit AD2    = ADR : 2;
__sbit AD3    = ADR : 3;
__sbit ADCK0  = ADR : 4;
__sbit ADCK1  = ADR : 5;
__sbit ADIE   = ADR : 6;
__sbit ADIF   = ADR : 7;

extern __at(0x0012) __sfr ADD;

typedef struct __ADVREFHbits_t
{
    unsigned VHS0     : 1;
    unsigned VHS1     : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned EVHENB   : 1;
} __ADVREFHbits_t;

extern __at(0x0013) volatile __ADVREFHbits_t ADVREFHbits;
extern __at(0x0013) __sfr ADVREFH;
__sbit VHS0   = ADVREFH : 0;
__sbit VHS1   = ADVREFH : 1;
__sbit EVHENB = ADVREFH : 7;

typedef struct __ADCRbits_t
{
    unsigned ADCR0    : 1;
    unsigned ADCR1    : 1;
    unsigned SHCK0    : 1;
    unsigned SHCK1    : 1;
    unsigned PBCON4   : 1;
    unsigned PBCON5   : 1;
    unsigned PBCON6   : 1;
    unsigned PBCON7   : 1;
} __ADCRbits_t;

extern __at(0x0014) volatile __ADCRbits_t ADCRbits;
extern __at(0x0014) __sfr ADCR;
__sbit ADCR0  = ADCR : 0;
__sbit ADCR1  = ADCR : 1;
__sbit SHCK0  = ADCR : 2;
__sbit SHCK1  = ADCR : 3;
__sbit PBCON4 = ADCR : 4;
__sbit PBCON5 = ADCR : 5;
__sbit PBCON6 = ADCR : 6;
__sbit PBCON7 = ADCR : 7;

typedef struct __AWUCONbits_t
{
    unsigned WUPA0    : 1;
    unsigned WUPA1    : 1;
    unsigned WUPA2    : 1;
    unsigned WUPA3    : 1;
    unsigned WUPA4    : 1;
    unsigned WUPA5    : 1;
    unsigned WUPA6    : 1;
    unsigned WUPA7    : 1;
} __AWUCONbits_t;

extern __at(0x0015) volatile __AWUCONbits_t AWUCONbits;
extern __at(0x0015) __sfr AWUCON;
__sbit WUPA0  = AWUCON : 0;
__sbit WUPA1  = AWUCON : 1;
__sbit WUPA2  = AWUCON : 2;
__sbit WUPA3  = AWUCON : 3;
__sbit WUPA4  = AWUCON : 4;
__sbit WUPA5  = AWUCON : 5;
__sbit WUPA6  = AWUCON : 6;
__sbit WUPA7  = AWUCON : 7;

typedef struct __PACONbits_t
{
    unsigned PACON0   : 1;
    unsigned PACON1   : 1;
    unsigned PACON2   : 1;
    unsigned PACON3   : 1;
    unsigned PACON4   : 1;
    unsigned PBCON0   : 1;
    unsigned PBCON1   : 1;
    unsigned PBCON2   : 1;
} __PACONbits_t;

extern __at(0x0016) volatile __PACONbits_t PACONbits;
extern __at(0x0016) __sfr PACON;
__sbit PACON0 = PACON : 0;
__sbit PACON1 = PACON : 1;
__sbit PACON2 = PACON : 2;
__sbit PACON3 = PACON : 3;
__sbit PACON4 = PACON : 4;
__sbit PBCON0 = PACON : 5;
__sbit PBCON1 = PACON : 6;
__sbit PBCON2 = PACON : 7;

extern __at(0x0017) __sfr ADJMD;

typedef struct __INTEDGbits_t
{
    unsigned INT0G0   : 1;
    unsigned INT0G1   : 1;
    unsigned INT1G0   : 1;
    unsigned INT1G1   : 1;
    unsigned EIS0     : 1;
    unsigned EIS1     : 1;
    unsigned EIS2     : 1;
    unsigned INT2EDGE : 1;
} __INTEDGbits_t;

extern __at(0x0018) volatile __INTEDGbits_t INTEDGbits;
extern __at(0x0018) __sfr INTEDG;
__sbit INT0G0 = INTEDG : 0;
__sbit INT0G1 = INTEDG : 1;
__sbit INT1G0 = INTEDG : 2;
__sbit INT1G1 = INTEDG : 3;
__sbit EIS0   = INTEDG : 4;
__sbit EIS1   = INTEDG : 5;
__sbit EIS2   = INTEDG : 6;
__sbit INT2EDGE = INTEDG : 7;

extern __at(0x0019) __sfr TMRH;

typedef struct __ANAENbits_t
{
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned CMPEN    : 1;
} __ANAENbits_t;

extern __at(0x001A) volatile __ANAENbits_t ANAENbits;
extern __at(0x001A) __sfr ANAEN;
__sbit CMPEN  = ANAEN : 7;

typedef struct __RFCbits_t
{
    unsigned PSEL0    : 1;
    unsigned PSEL1    : 1;
    unsigned PSEL2    : 1;
    unsigned PSEL3    : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned RFCEN    : 1;
} __RFCbits_t;

extern __at(0x001B) volatile __RFCbits_t RFCbits;
extern __at(0x001B) __sfr RFC;
__sbit PSEL0  = RFC : 0;
__sbit PSEL1  = RFC : 1;
__sbit PSEL2  = RFC : 2;
__sbit PSEL3  = RFC : 3;
__sbit RFCEN  = RFC : 7;

extern __at(0x001C) __sfr TM4RH;

extern __at(0x001D) __sfr OSCCALH;

extern __at(0x001E) __sfr OSCCALL;

typedef struct __INTE2bits_t
{
    unsigned          : 1;
    unsigned          : 1;
    unsigned T4IE     : 1;
    unsigned INT2IE   : 1;
    unsigned          : 1;
    unsigned          : 1;
    unsigned T4IF     : 1;
    unsigned INT2IF   : 1;
} __INTE2bits_t;

extern __at(0x001F) volatile __INTE2bits_t INTE2bits;
extern __at(0x001F) __sfr INTE2;
__sbit T4IE   = INTE2 : 2;
__sbit INT2IE = INTE2 : 3;
__sbit T4IF   = INTE2 : 6;
__sbit INT2IF = INTE2 : 7;

extern __at(0x00800005) volatile __fpage IOSTA;

extern __at(0x00800006) volatile __fpage IOSTB;

extern __at(0x00800007) volatile __fpage IOSTC;

extern __at(0x00800009) volatile __fpage APHCON;

extern __at(0x0080000A) volatile __fpage PS0CV;

extern __at(0x0080000B) volatile __fpage CPLCON;

extern __at(0x0080000C) volatile __fpage BODCON;

extern __at(0x0080000D) volatile __fpage CODCON;

extern __at(0x0080000E) volatile __fpage CMPCR;

extern __at(0x0080000F) volatile __fpage PCON1;

extern __at(0x01000000) volatile __spage TMR1;

extern __at(0x01000001) volatile __spage T1CR1;

extern __at(0x01000002) volatile __spage T1CR2;

extern __at(0x01000003) volatile __spage PWM1DUTY;

extern __at(0x01000004) volatile __spage PS1CV;

extern __at(0x01000005) volatile __spage BZ1CR;

extern __at(0x01000006) volatile __spage IRCR;

extern __at(0x01000007) volatile __spage TBHP;

extern __at(0x01000008) volatile __spage TBHD;

extern __at(0x0100000A) volatile __spage P2CR1;

extern __at(0x0100000C) volatile __spage PWM2DUTY;

extern __at(0x0100000F) volatile __spage OSCCR;

extern __at(0x01000011) volatile __spage P3CR1;

extern __at(0x01000013) volatile __spage PWM3DUTY;

extern __at(0x01000015) volatile __spage TMR4;

extern __at(0x01000016) volatile __spage T4CR1;

extern __at(0x01000017) volatile __spage T4CR2;

extern __at(0x01000018) volatile __spage PWM4DUTY;

extern __at(0x01000019) volatile __spage PS4CV;

extern __at(0x0100001A) volatile __spage TMR5;

extern __at(0x0100001B) volatile __spage T5CR1;

extern __at(0x0100001C) volatile __spage T5CR2;

extern __at(0x0100001D) volatile __spage PWM5DUTY;

extern __at(0x0100001E) volatile __spage PS5CV;

extern __at(0x0100001F) volatile __spage TM5RH;

extern __at(0x01800000) volatile __tpage SIMCR;

extern __at(0x01800001) volatile __tpage MADR;

extern __at(0x01800002) volatile __tpage MFDR;

extern __at(0x01800003) volatile __tpage MCR;

extern __at(0x01800004) volatile __tpage MSR;

extern __at(0x01800005) volatile __tpage SIMDR;

extern __at(0x01800006) volatile __tpage SPCR;

extern __at(0x01800007) volatile __tpage INTE3;

extern __at(0x01800008) volatile __tpage INTF3;

extern __at(0x01800018) volatile __tpage THR;

extern __at(0x01800019) volatile __tpage LCR;

extern __at(0x0180001A) volatile __tpage LSR;

extern __at(0x0180001B) volatile __tpage DLL;

extern __at(0x0180001C) volatile __tpage DLH;

extern __at(0x0180001E) volatile __tpage CCPCON;

extern __at(0x0180001F) volatile __tpage PWMDB;

extern __at(0x00800000) volatile __t0mdpage T0MD;


#endif /* end of include guard: NY8BE64D_H_S5PBG7ND */
